<?php
/**
 * Author: Administrator
 * Date: 2022/7/23 21:44
 */

namespace DesignPatterns\Behavioral\Command;


class HelloCommand implements CommandInterface
{
    protected $service;

    public function __construct($service)
    {
        $this->service = $service;
    }

    public function execute()
    {
        $this->service->write('Hello World!');
    }
}